<!--
 * @Author: CHINAKAIYUAN<sunkaiyuan@namenode.cn>
 * @Date: 2022-02-03 14:41:20
 * @LastEditTime: 2023-10-08 16:11:12
 * @LastEditors: 孙开源 && sunkaiyuan@namenode.cn
 * @Description:   :gridOps="gridOptions" 
-->
<template>
  <sc-VxeTable :gridEvts="gridEvents" :tablecode="'pro_outsourcing_storage'" :url="this.$API.storage.storage.list"
    :params="[{ 'location.is_outsourcing': 1 }]">
  </sc-VxeTable>
  <list-dialog v-if="dialog" ref="saveDialog" @closed="dialog = false" :params="list_params"></list-dialog>
</template>
  
<script>
import { ref, nextTick } from "vue";
import listDialog from "./list";
// import { VXETable } from 'vxe-table';
export default {
  components: { listDialog },
  setup() {
    const list_params = ref({});
    const dialog = ref(false);
    const saveDialog = ref({});
    const gridEvents = ref({
      cellDblclick: function ({ row }) {
        dialog.value = true;
        list_params.value = { summary_storage_id: row.id };
        nextTick(() => {
          saveDialog.value.open();
        });
      },
    });
    return {
      gridEvents,
      list_params,
      dialog,
      saveDialog
    };
  },
  name: "pro_outsourcing_storage",
};
</script>
